<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/common.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://java.sun.com/jsf/html">

    <ui:define name="title">
        Pick courses for student
    </ui:define>

    <ui:define name="head">
        <script src="../../res/js/jquery-1.10.2.min.js"></script>
        <script src="../../res/js/jquery-ui-1.10.0.custom.js"></script>
  <link rel="stylesheet" href="../../res/css/admin-style.css"/>
    </ui:define>

    <ui:define name="pageheader">
        Pick course
    </ui:define>

    <ui:define name="content">
        <h:form id="f1">
            <p:pickList id="pickList" value="#{studentManager.dualCourse}" var="co"   
                        itemLabel="#{co.name}" itemValue="#{co.courseId}"

                        addAllLabel="" showSourceFilter="true">
                <p:ajax event="transfer" listener="#{studentManager.courseTransfer}" transient="false"/>  
            </p:pickList>
            <div>
                <h:commandLink value="Update" action="#{studentManager.updateCourses}" />
            </div>
        </h:form>

    </ui:define>

</ui:composition>
